package com.android.vgongyi.parser;

import java.io.InputStream;

import android.content.Context;

import com.android.vgongyi.entity.FeedbackEntity;
import com.android.vgongyi.service.VGongyiException;
import com.android.vgongyi.utils.StringUtil;
import com.google.gson.Gson;

public class FeedbackParser extends BaseParser{

	public FeedbackEntity executeToObject(InputStream in, Context context) throws VGongyiException {
		if(in == null){
			return null;
		}
		FeedbackEntity feedbackEntity = new FeedbackEntity();	
		String json = StringUtil.converStreamToString(in);
	    Gson gson = new Gson();	        
	    feedbackEntity = gson.fromJson(json, FeedbackEntity.class);

		return feedbackEntity;
	}
}
